package com.yhq.basic.algorithm.array;

import sun.misc.LRUCache;

import java.util.LinkedHashMap;
import java.util.LinkedList;
import java.util.List;
import java.util.Vector;

/**
 * @author hqyin
 * @date 2023/8/23 10:29 上午
 */
public class TestLinkedList {
    public static void main(String[] args) {
        //测试自定义MyLinkedList
//        test_MyLinkedList();

//        test_LinkedList();

        //test LRUCache



    }

    private static void test_LinkedList() {
        List<String> list = new LinkedList<>();
        list.add("A");
        list.add("B");
        list.add("C");
        list.listIterator();
    }

    private static void test_MyLinkedList() {
        MyLinkedList<String> list = new MyLinkedList<>();
        list.add("A");
        list.add("B");
        list.add("C");
        System.out.println(list);
        list.add(3,"AA");
        System.out.println(list);
        System.out.println(list.get(1));
        list.remove("B");
        System.out.println(list);
        list.remove(0);
        System.out.println(list);
    }
}
